Field of the Invention
The present invention relates to image encoding apparatuses, image encoding methods and programs and particularly relates to adaptive rate control within a screen.
Description of the Related Art
H.264/MPEG-4 AVC (hereinafter, called H.264) has been known as an encoding method used for moving picture compression recording. (ITU-T H.264 (03/2010) Advanced video coding for generic audiovisual services) According to H.264, an image is encoded in blocks, but the quantization value is variable for each block. Controlling the quantization value to change the rate to be assigned to a block may allow image quality control. Japanese Patent Laid-Open No. 9-18872 is an example of technologies in the past of changing the rate to be assigned to a block. According to Japanese Patent Laid-Open No. 9-18872, evaluation values such as a luminance average value, color difference average value, luminance dispersion value, and motion vector rate average value of a block are multiplied to calculate the degree of difficulty of encoding of the block, and the rate is assigned to the block. In accordance with the assigned rate, the quantization value is controlled.
However, the control method according to Japanese Patent Laid-Open No. 9-18872 has a higher complexity of the calculation of the function for determining the quantization value, which may increase the cost as a result. The control method according to Japanese Patent Laid-Open No. 9-18872 is implemented on the premise that the relationship between an evaluation index linearly converted to one dimensional value and the quantization value is mathematized in advance by the multiplication of a plurality of evaluation values in advance. Therefore, it is diadvatageously difficult to nonlinearly identify a characteristic of a block to be encoded from various evaluation indices and thus adaptively implement detailed rate assignment in accordance with identification results.